//Thu May 19 09:05:11 CDT 2011
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class BusinessTasks {
public:
	string getTask(vector<string> list, int n) {
		int pos = 0;
		while (list.size() > 1) {
			pos = pos % list.size();
			pos = (pos + n - 1) % list.size();
			list.erase(list.begin() + pos);
		}
		return list[0];
	}
};

